A wide-gap semiconductor such as silicon carbide and gallium nitride is known as a material for realizing a semiconductor device capable of stably operating at a high temperature with low loss. However, a semiconductor device using a wide-gap semiconductor as the material has a problem in that it is difficult to introduce a dopant in high concentration by using ion implantation. Therefore, in Japanese Patent Application Publication No. 2008-118011 and Japanese Patent Application Publication No. 2010-258387, techniques for forming p-type base layers and n-type source layers by crystal growth are disclosed.